#pragma once
#ifndef OBJECT_H
#define OBJECT_H

#include <glad/glad.h>
#include "VAO.h"
#include "VBO.h"
#include "EBO.h"
#include "Texture.h"

class Object
{
	unsigned int m_ID;
	VAO *m_pVAOObj;
	VBO *m_pVBOVertex;
	VBO *m_pVBOTexcoord;
	EBO *m_pEBOIndex;
	Shader *m_pShader;
	Texture *m_pTexture;
	char *m_pLocation;
public:
	Object();
	~Object();
	void bind();
	void bindTexture(Texture *pTexture, char *pLocation);
	void texImage2D(GLint format, GLsizei width, GLsizei height, const void *pixels);
	void bindShader(Shader *pShader);
	void unBind();
	void vertexData(GLsizeiptr size, const void *data);
	void vertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
	void texcoordData(GLsizeiptr size, const void *data);
	void texcoordAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
	void indexData(GLsizeiptr size, const void *data);
	void drawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
	void drawArrays(GLenum mode, GLint first, GLsizei count);
	void pointSize(float pointSize);
	void lineWidth(float pointSize);
};

#endif